home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / PartMaker 4.4 / PartMaker Documents / Script Runner• / Script Runner•.rsrc / dFRK_5028 < prev    next >
Encoding:
Text File  |  1995-12-12  |  4.1 KB  |  129 lines

  1. /*
  2.     File:        OSAPlugInVers.h
  3.  
  4.     Contains:    Version definitions used by OSAPlugIn.idl/.r files.
  5.  
  6.     Written by:    Steve Smith
  7.  
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9.     
  10.     Notes:
  11.  
  12.     There are three sets of version numbers you need to maintain.
  13.     The CFM version numbers in the 'cfrg' resource, the SOM
  14.     class version numbers in the IDL file, and the Finder file
  15.     version number.
  16.     
  17.     Fortuantely, all three version schemes require a "major" and "minor"
  18.     number to generate the release version. This makes things
  19.     easier, but not simple. SOM classes only use those two pieces,
  20.     while CFM and the Finder define "development stage" and
  21.     "prerelease" version; the "prerelease" version can basically be
  22.     ignored, but be forewarned that CFM will use them, if provided.
  23.     
  24.     In all cases, a version number can be defined as 3 digits seperated
  25.     by 2 periods. The "major" version number has a range of 0-99, while
  26.     the two minor version numbers have a range of 0-9. An example of
  27.     a version number is '2.3.1'. All digits in the version number are
  28.     represented in Binary-Coded-Decimal (BCD) format even though they
  29.     appear in hexadecimal. The above example version number is 0x0231
  30.     in hexadecimal (note that the 3 and the 1 are in the same byte).
  31.     
  32.     Below is a set of defines to generate the version numbers for
  33.     all three instances. This file should be included in your .r and
  34.     .idl file to keep your part versioning in sync.
  35.     
  36.     Each time you need to update the version of the part generated, you
  37.     should find the appropriate constants and change them.
  38.     
  39.     ** WARNING **: Each linker that you run will require the same numbers you
  40.     specify here. Be sure to update your project preferences, for
  41.     integrated environments, and your makefile for MPW to ensure the version
  42.     numbers are the same everywhere.
  43.     
  44.     For complete explanation of version numbers, read the:
  45.     1) Finder Interface Chapter, Inside Macintosh: Macintosh Toolbox Essentials.
  46.     2) Code Fragment Chapter (pg 3-7), Inside Macintosh: PowerPC System Software
  47.     3) SOM Developer's Guide
  48. */
  49.  
  50. #ifndef _OSAPLUGINVERS_
  51. #define _OSAPLUGINVERS_
  52.  
  53.  
  54. // Development Stages
  55. #define dsUndefined        0x00
  56. #define dsPreAlpha        0x20
  57. #define dsAlpha            0x40
  58. #define dsBeta            0x60
  59. #define dsFinal            0x80
  60. #define dsReleased        dsFinal
  61. #define dsGoldenMaster    dsFinal
  62.  
  63.  
  64.  
  65. // • Change Often •
  66.  
  67. // Current Major Version (version = MAJOR.minor.fix)
  68. #define currentMajorVersion        0x01
  69.  
  70. // Current Minor Version (version = major.MINOR.fix)
  71. #define currentMinorVersion        0x00
  72.  
  73. // Current Fix Version (version = major.minor.FIX)
  74. #define currentFixVersion        0x00
  75.  
  76. // Development Stage
  77. #define developmentStage        dsFinal
  78.  
  79. // Pre-release Number
  80. #define preReleaseNumber        0x00
  81.  
  82. // Short version string
  83. #define shortVersionStr            "1.0"
  84.  
  85.  
  86.  
  87. // • Change Less Often •
  88.  
  89. // SOM Part Class Major Version (must be an integer)
  90. #define somClassMajorVersion    1
  91.  
  92. // SOM Part Class Major Version (must be an integer)
  93. // (note: though not necessary, you might want to keep this version number
  94. //        in sync with the cfm and finder version numbers. To do this, make
  95. //        the version number equal to value of the following equation:
  96. //           ( 10 * currentMinorVersion ) + currentFixVersion
  97. #define somClassMinorVersion    0
  98.  
  99.  
  100. // • Change Seldom •
  101.  
  102. // Old Compatibility Definition Major Version (for CFM only)
  103. #define oldCompDefnMajorVersion    0x00
  104.  
  105. // Old Compatibility Definition Minor Version (for CFM only)
  106. #define oldCompDefnMinorVersion    0x00
  107.  
  108. // Old Compatibility Definition Fix Version (for CFM only)
  109. #define oldCompDefnFixVersion    0x00
  110.  
  111. // Pre-release Number
  112. #define oldCompDefnPreRelNumber    0x00
  113.  
  114. // Development Stage
  115. #define oldCompDefnDevStage        dsUndefined
  116.  
  117.  
  118. // • Generated Version Numbers •
  119. //       (Don't Change!!)
  120.  
  121. #define currentVersion            (currentMajorVersion<<24)+(currentMinorVersion<<20)+(currentFixVersion<<16)    \
  122.                                 +(developmentStage<<8)+preReleaseNumber
  123. #define compatibleVersion        (oldCompDefnMajorVersion<<24)+(oldCompDefnMinorVersion<<20)    \
  124.                                 +(oldCompDefnFixVersion<<16)+(oldCompDefnDevStage<<8)+oldCompDefnPreRelNumber
  125. #define finderMinorVersion        (currentMinorVersion<<4)+(currentFixVersion<<0)
  126.  
  127.  
  128. #endif // _OSAPLUGINVERS_
  129.